<template>
  <div class="box">
    <div class="headImg">{{ name.substring(0,1) }}</div>
    <p class="name">{{ name }}</p>
  </div>
</template>

<script>
export default {
  name: "ChatFriend",
  data() {
    return {

    }
  },
  props: {
    name: {
      type: String,
      default: "You"
    }
  }
}
</script>

<style scoped lang="scss">
$color: #0D7AE4;

.box {
  margin: 10px;
  padding: 20px;
  display: flex;
  border: 1px solid #606060;
  border-radius: 10px;
  cursor: pointer;
  align-items: center;

  .headImg {
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    background-color: $color;
    border-radius: 50%;
    color: white;
    margin-right: 20px;
  }

  .name{
    color: white;
    font-size: 16px;
  }
}
</style>